package com.dabai.iot.core.convert;

import com.dabai.iot.core.dto.DeviceInput;
import com.dabai.iot.core.entity.DeviceEntity;
import com.dabai.iot.core.vo.DeviceBasicVO;
import com.dabai.iot.core.vo.DeviceSelectVO;
import com.dabai.iot.core.vo.DeviceVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 设备 Convert
 *
 * @author kev1n
 */
@Mapper
public interface DeviceConvert {

    DeviceConvert INSTANCE = Mappers.getMapper(DeviceConvert.class);

    DeviceEntity convert(DeviceInput input);

    DeviceVO convertVO(DeviceEntity device);

    DeviceSelectVO convertSelectVO(DeviceEntity device);

    DeviceBasicVO convertBasicVO(DeviceEntity device);

    List<DeviceBasicVO> convertBasicVOList(List<DeviceEntity> deviceEntityList);
}
